package com.example.demo.entity;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;
import org.apache.poi.ss.formula.functions.T;

import java.util.List;

/**
 * @author 港某
 * @date 2021/9/14 11:19
 */
@Data
public class PageUtil<T> {

    private long totalCount;
    private long pageSize;
    private long totalPage;
    private long currPage;
    private List<T> list;

    public PageUtil(Page<T> page) {
        this.list = page.getRecords();
        this.totalCount = page.getTotal();
        this.pageSize = page.getSize();
        this.currPage = page.getCurrent();
        this.totalPage = page.getPages();
    }

}
